/*
 * Copyright 2021 ThoughtWorks, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
@import "../../global/common";

.backup-message {
  font-style: italic;
  font-size:  16px;
}

.backup-steps {
  list-style-type: none;
  margin:          0 0 0 15px;
  padding:         0;
  position:        relative;

  &:before {
    position:    absolute;
    left:        0;
    top:         30px;
    bottom:      30px;
    content:     "";
    border-left: 2px dashed darken($line-color, 20%);
  }

  li {
    padding:   20px 0 20px 40px;
    position:  relative;
    font-size: 16px;

    &:before {
      position:      absolute;
      left:          -10px;
      top:           50%;
      content:       "";
      width:         24px;
      height:        24px;
      border-radius: 50%;
      background:    darken($line-color, 10%);
      transform:     translateY(-50%);
    }

    &.backing-up {
      &:before {
        background: $white;
        width:      35px;
        height:     35px;
        left:       -20px
      }
    }

    &.backed-up {
      @include icon-before($type: $fa-var-check, $color: $white);

      &:before {
        background:  $go-green;
        text-align:  center;
        line-height: 23px;
        margin:      0;
      }
    }

    &.failed {
      &:before {
        background: $go-danger;
      }
    }
  }

  .spinner {
    @include icon-before($type: $fa-var-spinner);
    position: absolute;
    left:     -14px;

    &:before {
      animation: spin 1500ms linear infinite;
      font-size: 20px;
    }
  }

  @keyframes spin {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }
}

.steps-container {
  padding:      20px 30px;
  border-left:  1px solid $border-color;
  border-right: 1px solid $border-color;
}

.error-container {
  margin: 5px 0 -10px 0;
}
